CSRC += main.cpp
CUSRC += func.cu gpuinfo.cu
C_OBJ += build/main.o
CU_OBJ += build/func.o build/gpuinfo.o
HEADER += func.h
OBJS = $(C_OBJ) $(CU_OBJ)
INCLUDE += -I.

all:$(OBJS)
	nvcc -o cudatest_exe $(OBJS) -lcudart -lcuda -L/usr/local/cuda/lib64

build/%.o:%.cpp
	g++ -c $< -o $@ 
	
build/%.o:%.cu
	nvcc -c $^ -o $@ 

clean:
	rm -f build/*
	rm -f cudatest_exe
	rm -f *.o